package com.link.base.base.interstatistics.controller;

import com.link.base.base.interstatistics.model.VisitStatistics;
import com.link.base.base.interstatistics.service.VisitStatisticsService;
import com.link.core.basic.controller.BasicController;
import com.link.core.basic.service.BasicService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;


/**
 * @author yipeng.zhu@hand-china.com
 * @version 1.0
 * @date: 10:04 2019/1/16
 */

@Controller
@RequestMapping("/link/visitStatistics")
public class VisitStatisticsController extends BasicController<VisitStatistics> {
    private static final Logger logger = LogManager.getLogger(VisitStatisticsController.class);
    @Resource
    private VisitStatisticsService visitInfoService;

    @Override
    public BasicService<VisitStatistics> getBasicService() throws Exception {
        return visitInfoService;
    }

//    @RequestMapping(value = "addUrlsToRole",method = RequestMethod.POST)
//    public Map<String, Object> addUrlToRole(@RequestBody List<VisitStatistics> visitStatistics) {
//        Map<String,Object> result = new HashMap<>();
//        try {
//            List<String> addErrorUrls = visitInfoService.addUrlsToRole(visitStatistics);
//            if (addErrorUrls.isEmpty()) {
//                result.put("success",true);
//            }
//        } catch (Exception e) {
//            result.put("success",false);
//            result.put("result","部分URL未授权成功");
//        }
//
//        return result;
//    }

}
